diff --git a/2019/event.php b/2019/event.php new file mode 100644 index 0000000..febfa33 --- /dev/null +++ b/2019/event.php @@ -0,0 +1,354 @@ +. + +require 'load.php'; + +$conference = FullConference::factoryFromUID( CURRENT_CONFERENCE_UID ) + ->queryRow(); + +$conference or die_with_404(); + +$event = FullEvent::factoryByConferenceAndUID( + $conference->getConferenceID(), + @ $_GET['uid'] +)->queryRow(); + +if( !$event ) { + die_with_404(); +} + +FORCE_PERMALINK and $event->forceEventPermalink(); + +$args = [ + 'title' => sprintf( + __("%s: %s"), + $event->getChapterName(), + $event->getEventTitle() + ), + 'url' => $event->getEventURL() +]; + +if( $event->hasEventImage() ) { + $args['og'] = [ + 'image' => $event->getEventImage() + ]; +} + +// Adding subscribers +$subscribed = null; +if( isset( $_POST['subscription_email'] ) && $event->areEventSubscriptionsAvailable() ) { + $email = $_POST['subscription_email']; + + if( filter_var($email, FILTER_VALIDATE_EMAIL) ) { + $event->addSubscription($email); + + $args['alert'] = __("Grazie per esserti iscritto."); + $args['alert.type'] = Messagebox::INFO; + $subscribed = true; + } else { + $args['alert'] = __("E-mail non valida."); + $args['alert.type'] = Messagebox::ERROR; + $subscribed = false; + } +} + +Header::spawn( null, $args ); +?> + isEventEditable() ): ?> +

getFullEventEditURL(), + __("Modifica evento") . icon('edit', 'left') + ) ?>

+ + +
+
+
+
+ <?php
+						echo esc_attr( $event->getEventTitle() )
+					?> +
+
+
+ + +
+ + + + + + + + + + + + + +
+ getTrackName() ?>
+ getTrackLabel() ?> +
+ getRoomName() ?>
+ @ getLocationGeoOSM(), + $conference->getLocationName(), + $conference->getLocationAddress(), + null, + 'target="_blank"' + ) ?>
+ getLocationAddress() ?> +
+ getEventHumanStart() ?>
+ getEventStart('d/m/Y'), + $event->getEventStart('H:i') + ) ?>
+ getEventCalURL(), + __( "Scarica promemoria calendario" ) + ) ?> +
+
+ +
+ + + hasEventAbstract() ): ?> +
+
+

+ getEventAbstractHTML( ['p' => 'flow-text'] ) ?> +
+ + + + + hasEventDescription() ): ?> +
+
+

+ getEventDescriptionHTML( ['p' => 'flow-text'] ) ?> +
+ + + + + areEventSubscriptionsAvailable() ): ?> +
+
+ +

+ +
+
+
+
+

+

+
+
+ + +
+
+ +
+
+
+
+
+
+ +
+ + + + + hasEventNote() ): ?> +
+
+

+ getEventNoteHTML( ['p' => 'flow-text'] ) ?> +
+ + + + + factorySharebleByEvent() + ->queryGenerator(); + ?> + valid() ): ?> +
+
+

+
+ +
+ isSharableDownloadable() ): ?> +

+ getSharablePath(), + icon('attachment', 'left') . $sharable->getSharableTitle(['prop' => true]), + null, + null, + 'target="_blank"' + ), + $sharable->getSharableLicense()->getLink() + ) ?> +

+ isSharableVideo() ): ?> + + + +

+ getSharablePath(), + icon('share', 'left') . $sharable->getSharableTitle( ['prop' => true] ), + null, + null, + 'target="_blank"' + ), + $sharable->getSharableLicense()->getLink() + ) ?> +

+ +
+ +
+
+ + + + +
+
+

+ + factoryUserByEvent() + ->queryGenerator(); ?> + + valid() ): ?> +
+ +
+
+ +
+ getUserURL(), + "

{$user->getUserFullname()}

", + sprintf( + __("Profilo di %s"), + $user->getUserFullname() + ), + 'valign' + ) ?> +
+
+
+ +
+ +

+ +
+ + + factoryPreviousFullEvent() + ->select('event_uid', 'event_title', 'chapter_uid', 'conference_uid', 'event_start') + ->limit(1) + ->queryRow(); + + $next = $event->factoryNextFullEvent() + ->select('event_uid', 'event_title', 'chapter_uid', 'conference_uid', 'event_start') + ->limit(1) + ->queryRow(); + ?> + + +
+
+
+
+ +

+

+ getEventURL( ROOT ), + $previous->getEventTitle() + ) ?> + +

+ +
+
+ +

+

+ getEventURL( ROOT ), + $next->getEventTitle() + ) ?> + +

+ +
+
+
+ + + + +